import numpy as np


def diff_precision(numpy1, numpy2, is_strict_alignment, precision=0.):
    if is_strict_alignment:
        # 严格对齐
        return np.array_equal(numpy1, numpy2)
    else:
        # 精度略微损失对齐
        return np.where(abs(numpy1.astype(np.float32) - numpy2.astype(np.float32)) > precision)[0].shape[0] == 0
